From: Keir Fraser Date: Tue, 15 Jun 2010 12:27:14 +0000 (+0100) Subject: python/xc: fix out of bounds array access X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~11919 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=56d6b7ac5dedb2413b22713e3760a617a3d5e260;p=xen.git python/xc: fix out of bounds array access Writing a NUL terminator here isn't even necessary, since snprintf() already guarantees proper termination. Signed-off-by: Jan Beulich --- diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c index 7330191ebd..a7286c4e85 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/xc.c @@ -58,7 +58,6 @@ static PyObject *pyxc_error_to_exception(xc_interface *xch) snprintf(err_buf.message, sizeof(err_buf.message), "xc_interface_open failed: %s", strerror(errno)); - err_buf.message[sizeof(err_buf)-1] = 0; err_buf.code = XC_INTERNAL_ERROR; err = &err_buf; }